import request from '@/utils/request'


// 获取词汇测试列表
export const vocabularyExamList = (params) => {
    return request.get('/vocabulary-exam/list-page', { params })
}

// 获取词汇测试详情
export const vocabularyExamDetail = (params) => {
    return request.get('/vocabulary-exam', { params })
}

// 获取测试词汇
export const wordsList = (params) => {
    return request.get('/vocabulary-exam/words-list', { params })
}

// 开始测试
export const startExam = (params) => {
    return request.post('/vocabulary-exam/start', params)
}

// 提交测试答案
export const vocabularyAnswer = (params) => {
    return request.post('/vocabulary-exam/answer', params)
}

// 获取收藏列表
export const collectList = (params) => {
    return request.get('/vocabulary-collect/list-page', { params })
}

// 收藏词汇
export const collect = (params) => {
    return request.post('/vocabulary-collect', params)
}

//取消收藏
export const cancelCollect = (params) => {
    return request.delete('/vocabulary-collect', { params })
}

//根据词汇id取消收藏
export const cancelCollectByVocabularyId = (params) => {
    return request.delete('/vocabulary-collect/vocabulary', { params })
}